Skip to content

Conversation

Tashows
Copy link
Contributor

@Tashows Tashows commented Sep 25, 2025

I am working on a feature and want to be able to call this via dokku. Ideally dokku buildpacks:detect app_name, alternatively via a custom plugin. Let me know which one would make more sense.

Basically just needs to run something like this:

docker run --rm \
  -v "$APP_ROOT:/tmp/app" \
  ${BUILDPACK_DETECT_OUTPUT:+-e BUILDPACK_DETECT_OUTPUT="$BUILDPACK_DETECT_OUTPUT"} \
  gliderlabs/herokuish \
  /bin/herokuish buildpack detect /tmp/app
;;

If this is moved into buildpacks (or a separate) plugin, then the part that checks out a potential bare git repo, could probably be moved there as well and just run before the command above. Not sure about permissions complications.

@josegonzalez
Copy link
Member

Yeah I feel like the part that checks out the repo should be separate from here, can you make that change?

@Tashows
Copy link
Contributor Author

Tashows commented Sep 30, 2025

Cleared that out and also added handling json output when multiple buildpacks are detected.

Would you like me to add the relevant functionality to utilize this in the core buildpacks plugin? Or would you rather I create a separate plugin?

@Tashows
Copy link
Contributor Author

Tashows commented Sep 30, 2025

It might be useful to add "url", "slug" (eg. "heroku/ruby") or even "version" (eg. "v321") to the json output, but I am not sure how to get these. If that makes sense, do you have any suggestions I can look into?

@josegonzalez
Copy link
Member

I'd actually rather not have this tool expose json output. Mind removing that?

The detected buildpack will be in the buildpack-url and the buildpack-version file: https://github.com/gliderlabs/herokuish/blob/master/buildpacks/buildpack-clojure/buildpack-url https://github.com/gliderlabs/herokuish/blob/master/buildpacks/buildpack-clojure/buildpack-version

@Tashows
Copy link
Contributor Author

Tashows commented Sep 30, 2025

Cleared that up as well. It was optional and nice-to-have really, but I get it.

Let me know if you'd rather have this functionality utilized in the core "buildpacks" dokku plugin (so we can run dokku buildpacks:detect app_name), or I make a separate plugin.

Thanks for the comments.

@josegonzalez josegonzalez changed the title Expose detect Expose buildpack detection as a command Oct 1, 2025
@josegonzalez
Copy link
Member

Mind adding a test for this functionality?

@Tashows
Copy link
Contributor Author

Tashows commented Oct 5, 2025

Tests added. Couldn't figure out how to handle a scenario when BUILDPACK_URL is set.

@josegonzalez josegonzalez merged commit 4c9efba into gliderlabs:master Oct 12, 2025
20 checks passed
josegonzalez added a commit that referenced this pull request Oct 12, 2025
- #1608 @dokku-bot: Update nodejs to version v310
- #1609 @dependabot: chore(deps): bump puma from 7.0.2 to 7.0.3 in /buildpacks/buildpack-ruby/tests/ruby-sinatra
- #1610 @dokku-bot: Update gradle to version v46
- #1611 @dokku-bot: Update gradle to version v47
- #1612 @dokku-bot: Update go to version v213
- #1613 @dokku-bot: Update ruby to version v321
- #1614 @dokku-bot: Update gradle to version v48
- #1615 @dokku-bot: Update python to version v308
- #1616 @dokku-bot: Update python to version v309
- #1617 @dokku-bot: Update php to version v274
- #1618 @dependabot: chore(deps-dev): bump heroku/heroku-buildpack-php from 273 to 274 in /buildpacks/buildpack-php/tests/php
- #1619 @dependabot: chore(deps): bump hadolint/hadolint-action from 3.2.0 to 3.3.0
- #1620 @dokku-bot: Update python to version v310
- #1621 @dependabot: chore(deps): bump puma from 7.0.3 to 7.0.4 in /buildpacks/buildpack-ruby/tests/ruby-sinatra
- #1622 @Tashows Expose buildpack detection as a command
- #1624 @dokku-bot: Update nodejs to version v313
- #1625 @dependabot: chore(deps): bump markupsafe from 3.0.2 to 3.0.3 in /buildpacks/buildpack-python/tests/python-flask
- #1626 @dependabot: chore(deps): bump markupsafe from 3.0.2 to 3.0.3 in /buildpacks/buildpack-multi/tests/multi
- #1627 @dokku-bot: Update ruby to version v322
- #1628 @dokku-bot: Update scala to version v100
- #1629 @dependabot: chore(deps-dev): bump heroku/heroku-buildpack-php from 274 to 275 in /buildpacks/buildpack-php/tests/php
- #1630 @dokku-bot: Update python to version v311
- #1631 @dokku-bot: Update php to version v275
- #1632 @josegonzalez fix: use updated method of setting environment variables in Dockerfile
- #1633 @dependabot: chore(deps-dev): bump heroku/heroku-buildpack-php from 275 to 276 in /buildpacks/buildpack-php/tests/php
- #1634 @dokku-bot: Update python to version v312
- #1635 @dokku-bot: Update php to version v276
- #1636 @dependabot: chore(deps): bump rack from 3.2.1 to 3.2.2 in /buildpacks/buildpack-multi/tests/multi
- #1637 @dependabot: chore(deps): bump rack from 3.2.1 to 3.2.2 in /buildpacks/buildpack-ruby/tests/ruby-sinatra
- #1638 @dependabot: chore(deps): bump sinatra from 4.1.1 to 4.2.0 in /buildpacks/buildpack-ruby/tests/ruby-sinatra
- #1639 @dependabot: chore(deps): bump sinatra from 4.1.1 to 4.2.0 in /buildpacks/buildpack-multi/tests/multi
- #1640 @dokku-bot: Update go to version v214
- #1642 @dependabot: chore(deps): bump rack from 3.2.2 to 3.2.3 in /buildpacks/buildpack-multi/tests/multi
- #1643 @dependabot: chore(deps): bump rack from 3.2.2 to 3.2.3 in /buildpacks/buildpack-ruby/tests/ruby-sinatra
- #1644 @dokku-bot: Update ruby to version v324
- #1645 @dokku-bot: Update python to version v313
- #1646 @dokku-bot: Update nodejs to version v314
@josegonzalez josegonzalez mentioned this pull request Oct 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants